from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options
import discuz_login

url = r'http://192.168.190.130/upload/'
dr = webdriver.Chrome(options=options)
dr.get(url)
dr.maximize_window()
#登录
dr.find_element(By.XPATH, '//*[@id="ls_username"]').send_keys('test01')
dr.find_element(By.XPATH, '//*[@id="ls_password"]').send_keys('123456')
dr.find_element(By.XPATH, '//*[@id="lsform"]/div/div/table/tbody/tr[2]/td[3]/button').click()
sleep(6)

#看帖子
dr.find_element(By.XPATH,'//*[@id="category_1"]/table/tbody/tr[1]/td[2]/h2/a').click()
sleep(2)
dr.find_element(By.XPATH,'//*[@id="normalthread_28"]/tr/th/a[2]').click()
sleep(2)
